home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / npfobs12 / module1.bas next >
Encoding:
BASIC Source File  |  1999-02-02  |  684 b   |  19 lines

  1. Attribute VB_Name = "Module1"
  2.  
  3. Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
  4.  
  5. Function GetPropertyFromFBS(PropertyName As String, DefaultValue As String) As String
  6.  
  7.     Dim i As Integer
  8.     Dim str1 As String
  9.     Dim rc1 As Long
  10.     
  11.     str1 = String(2000, " ")
  12.     rc = GetPrivateProfileString("PROPERTIES", PropertyName, DefaultValue, str1, 100, "C:\FOBSAX.FBS")
  13.     str1 = Left(str1, rc)
  14.  
  15.     GetPropertyFromFBS = str1
  16.  
  17. End Function
  18.  
  19.